home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / shtdll15.zip / SHTDLL14.TXT < prev    next >
Text File  |  1995-07-01  |  4KB  |  112 lines

  1. -----------------------------------------------------------------
  2. shtdll.dll v1.4
  3. Copyright, June 1995, Minxiu Chen, All Rights Reserved
  4. ----------------------------------------------------------------
  5.  
  6. Shtdll.dll is a dll file, which can open and read the cell values of
  7. excel worksheets and lotus sheets. The source code is written in C.
  8. Shtdll.dll is only for worksheet, is not for workbook. 
  9.  
  10. The structure and functions within shtdll.dll are:
  11.      struct Grd 
  12.     {
  13.         int col;
  14.         int row;
  15.         long unReadbyte;
  16.     } * LPGrd
  17.  
  18.     HFILE   OpenSptFile( LPSTR FileName, LPSTR ext, 
  19.          LPSTR ctmext, LPGrd pgrd)
  20.         HFile     --- Returned file handle.
  21.         FileName --- Filename for output.
  22.         ext      --- Filename extension for output.
  23.         ctmext   --- Custom filename extension for input.
  24.         pgrd     --- Pointer to a struct for output.
  25.     BOOL   ReadSheets(HFILE hFile, LPSTR ext,
  26.          LPGrd pgrd, LPSTR lpval)
  27.         HFile     --- File Handle for input.
  28.         ext      --- Filename extension for input.
  29.         pgrd     --- Pointer to a struct for output.
  30.         lpval     --- Pointer to Cell value string for output.
  31.     BOOL   FlClose(void)
  32.         HFile     --- File Handle for input.
  33.  
  34. The opensptfile function open a "file open dialog window", user can 
  35. choice a spreadsheet to be opened, it return a file handle. 
  36. The parameter FileName points to a string, which contains the user 
  37. selected opened filename. In the "file open dialog window" the preset
  38. filter values are *.xls and *wk1. User can optionally enter a custom 
  39. filter value ctmext, The parameter ext (a filename extension)
  40. and pgrd ( a point to a structure) contain information which should
  41. pass to ReadSheets function. 
  42. The ReadSheets function reads a cell value with its column and row 
  43. numbers. Parameter lpval points to a string contain the cell value,
  44. and pgrd contains its column number and row number. The unReadbyte
  45. can be used in a reading progress picture. if the call success
  46. it will return 1. Repeat to Call ReadSheets function until read out all 
  47. cell values, then it return 0 and close the file. If user do not read 
  48. all the cells, he may  close the file with FlClose function.
  49. For the file opened by the custom filter, user should provide code
  50. for reading sheet.
  51.  
  52.  
  53.     
  54.  
  55. A Visual Basic sample application is included.
  56. If the user don't have vbrun300.dll in his/her window/system directory, 
  57. he/she should download vbrun300.dll from SimTel, CICA or other sites 
  58. and put in same directory as expr.exe or search path to run the expr.exe.
  59.  
  60. For Visual Basic user the declare statement will be: 
  61.     Type grd
  62.          col As Integer
  63.          row As Integer
  64.          unReadbyte As Long
  65.     End Type
  66.  
  67.     Declare Function opensptfile Lib "shtdll.dll" 
  68.         (ByVal hFile As Integer,
  69.          ByVal FileName As String, ByVal pext As String, 
  70.          ByVal ctmext As String, grddata As grd) As Integer
  71.     Declare Function readsheets Lib "shtdll.dll" 
  72.         (ByVal hFile As Integer, ByVal pext As String,
  73.          grddata As grd, ByVal txt As String) As Integer
  74.     Declare Function flclose Lib "shtdll.dll" (ByVal hFile As Integer) 
  75.          As Integer
  76.  
  77. For VB calling routines, you have to declare enough room for the returned
  78. string variables to receive them:
  79.     Dim FileName As String * 128
  80.     Dim Pext As String * 3
  81.  
  82.  
  83. Registration
  84. ============
  85. The program shtdll.dll is distributed as a shareware program. 
  86. You have the right to test this program for 10 days. You are 
  87. allowed to copy this unregistered version and give it to any other person, 
  88. as long as it is not modified in any way.
  89.  
  90. Usage of this software after the evaluation period, If you find it 
  91. useful and want to keep using it, you are obliged to register 
  92. your copy, The registered user can get all newer versions 
  93. free when upgrade. 
  94.  
  95. This software may not be used for commercial purpose without 
  96. registration. 
  97.  
  98.  
  99.  
  100. Disclaimer
  101. ==========
  102. The program has been tested to keep it as bug-free.  But I still 
  103. declair it is supplied "As is"  without warranty of any kind. You
  104. use it at your own risk.   I accept no responsibility for
  105. any damage or loss, physical, financial, or otherwise, that may
  106. result from the use.
  107.  
  108. If these terms are not acceptable to you, then you have NO license 
  109. to use or test shtdll. You should IMMEDIATELY DELETE it from
  110. your disks.
  111.  
  112.